Determines in parallel whether a sequence contains a specified element
by using the default equality comparer.
Namespace:
System.Linq
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Function Contains(Of TSource) ( _
source As ParallelQuery(Of TSource), _
value As TSource _
) As Boolean |
C# |
---|
public static bool Contains<TSource>(
ParallelQuery<TSource> source,
TSource value
)
|
Parameters
- source
- Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A sequence in which to locate a value.
- value
- Type: TSource
The value to locate in the sequence.
Type Parameters
- TSource
- The type of elements of source.
Return Value
true if the source sequence contains an element that has the specified value; otherwise, false.
Exceptions
Exception | Condition |
---|
System..::.ArgumentNullException |
source is a null reference (Nothing in Visual Basic).
|
System..::.AggregateException |
One or more exceptions occurred during the evaluation of the query.
|
System..::.OperationCanceledException |
The query was canceled.
|
See Also